void main() {
  print(
      "Hello World!"); // This is a comment. Comments are not executed.
      var age = 18;
      print(age);
      const num =3.1415926;
      const r = 2;
      const area = num * r * r;
      final time = DateTime.now();
      print(time);
      List numbers = [1,2,3,4,5,6,7,8,9];
      numbers.forEach((item){
        print(item);
      });

      numbers.every((item){
        return item.toString().startsWith('1');
      });
//startsWith是字符串方法，判断字符串是否以某个字符开头
      numbers.where((item){
        return item.toString().startsWith('1');
      }).toList();
      //得到一个Iterable列表对象
      print(numbers.length);
      print(numbers.last);
      print(numbers.first);
      print(numbers.isEmpty);
      Map transMap = {1:'one',2:'two',3:'three'};
      print(transMap);
      print(transMap[1]);
      print(transMap[2]);
      transMap[2] = 'Two';

      transMap.forEach((key,value){
        print('$key,$value');
      });

      transMap.addAll({4:'four'});
      print(transMap);

      transMap.containsKey(1);//是否包含key

      transMap.remove(4);//删除某个key
      print(transMap);

      transMap.clear();//清空所有键值对
      print(transMap);




}